﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="spTasks.aspx.cs" Inherits="spWebSite.Workflow.spTasks" %>
<%@ Register src="../Controls/Pager.ascx" tagname="Pager" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <%=LinkCss %>
    <script type="text/javascript">
        window.onload = function (event) { window.setInterval(publishHeight, 300); }
        function winOpenForm(strURL, id) {
            document.getElementById(id).style.display = "none";
            var sheight = screen.height - 150;
            var swidth = screen.width - 10;
            var winoption = "left=0,top=0,height=" + sheight + ",width=" + swidth + ",toolbar=yes,menubar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes";
            var tmp = window.open(strURL, '', winoption);
            return tmp;
        }
        function winOpenForm2(strURL) {
            var sheight = screen.height - 150;
            var swidth = screen.width - 10;
            var winoption = "left=0,top=0,height=" + sheight + ",width=" + swidth + ",toolbar=yes,menubar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes";
            var tmp = window.open(strURL, '', winoption);
            return tmp;
        } 
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="divBody" style="min-height:442px;">
    <anthem:Label ID="ERROR" runat="server" Text="页面已跳转至新的窗口!!" Visible="false" AutoUpdateAfterCallBack="true"></anthem:Label>
    <anthem:Panel ID="P_All" runat="server" AutoUpdateAfterCallBack="true">
    <table width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="2">
                <table width="100%" style="border:1px solid #BCBCBC;" cellpadding="0" cellspacing="0">
                    <tr>
                        <td colspan="11" style="background:url('../Resource/Images/Icon_TableLine.gif') repeat-x;height:10px;margin-top:0px;"></td>
                    </tr>
                    <tr>
                        <td style="width:2px;height:32px;"></td>
                        <td style="width:35px;">
                            <anthem:DropDownList ID="FitType" Width="50" runat="server" AutoUpdateAfterCallBack="true">
                                <asp:ListItem>标题</asp:ListItem>
                                <asp:ListItem>编号</asp:ListItem>
                            </anthem:DropDownList></td>
                        <td style="width:90px;"><anthem:TextBox ID="Description" runat="server" AutoUpdateAfterCallBack="true" Width="80"></anthem:TextBox></td>
                        <td style="width:46px;">申请人:</td>
                        <td><anthem:TextBox ID="Applicator" runat="server" AutoUpdateAfterCallBack="true" Width="60"></anthem:TextBox></td>
                        <td style="width:60px;">流程类型:</td>
                        <td style="width:130px;"><anthem:DropDownList ID="Category" runat="server" Width="130" AutoUpdateAfterCallBack="true"></anthem:DropDownList></td>
                        <td style="width:60px;" align="right">创建日期:</td>
                        <td><anthem:CalendarExt ID="DateStart" runat="server" AutoUpdateAfterCallBack="true" Width="84"></anthem:CalendarExt>-<anthem:CalendarExt ID="DateEnd" runat="server" AutoUpdateAfterCallBack="true" Width="84"></anthem:CalendarExt></td>
                        <td style="width:10px;"></td>
                        <td><anthem:Button ID="Search" runat="server" EnableCallBack="true" style="background:url('../Resource/Images/Icon_ButtonBg.gif') 0px -12px; border:1px solid #FCC245; padding-top:2px; cursor:pointer;height:22px;width:60px;" Text="搜索" OnClick="Search_Click" /></td>
                    </tr>
                    <tr>
                        <td colspan="11" style="height:4px;"></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td style="height:6px"></td>
                    </tr>
                    <tr>
                        <td style="background:url('../Resource/Images/Icon_TableLine2.gif') repeat-x;height:16px;"></td>
                    </tr>
                    <tr>
                        <td style="height:2px"></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            <anthem:Repeater ID="Details" runat="server" AutoUpdateAfterCallBack="true">
                <HeaderTemplate>
                    <table width="100%" cellpadding="0" cellspacing="0" class="divTable">
                        <thead class="Title">
                            <tr style="background:url(../Resource/Images/Icon_TableTitle.gif) repeat-x;">
                                <td style="width:30px;" align="center">&nbsp;</td>
                                <td>标题</td>
                                <td>流程类型</td>
                                <td style="width:42px;">创建人</td>
                                <td style="width:110px;">创建时间</td>
                                <td style="width:110px;display:<%=EndTimeHide%>">最后提交时间</td>
                                <td style="width:110px;">当前节点</td>
                                <td style="width:60px;">当前状况</td>
                                <td width="24px" class="End" style="display:<%=IncHide%>"></td>
                            </tr>
                        </thead>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="Item" id="ID<%# Eval("TaskID")%>">
                        <td><a style="cursor:pointer;text-decoration:none;" title='<%# Eval("ProcessName")%>(<%# Eval("Incident")%>)' href='<%# Eval("Url")%>' onclick="javascript:document.getElementById('ID<%# Eval("TaskID")%>').style.display='none'"; target="_blank"><%# Eval("Action")%></a></td>
                        <td><a style="cursor:pointer;text-decoration:none;" title='<%# Eval("ProcessName")%>(<%# Eval("Incident")%>)' onclick="javascript:winOpenForm('<%# Eval("Url")%>','ID<%# Eval("TaskID")%>');" target="_blank"><%# Eval("Description")%></a></td>
                        <td><a style="cursor:pointer;text-decoration:none;" title='<%# Eval("ProcessName")%>(<%# Eval("Incident")%>)' onclick="javascript:winOpenForm('<%# Eval("Url")%>','ID<%# Eval("TaskID")%>');" target="_blank"><%# Eval("ProcessName")%></a></td>
                        <td><%# Eval("InitiatorName")%></td>
                        <td><%# Eval("StartTime", "{0:yyyy-M-d H:m}")%></td>
                        <td style='display:<%=EndTimeHide%>'><%# Eval("EndTime", "{0:yyyy-M-d H:m}")%></td>
                        <td><%# Eval("StepLabel")%></td>
                        <td><%# Eval("IncStatus")%></td>
                        <td align="center" style="display:<%=IncHide%>"><%# Eval("Incident")%></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </anthem:Repeater> 
            <uc1:Pager ID="Pager1" runat="server" OnPageChanged="Pagger_PageChanged" />                        
            </td>
        </tr>
    </table>
    </anthem:Panel>
    </div>
    </form>
</body>
</html>



